package src.model.gameWorld.pathfinding.movement;

import geometry.Vector2D;

/**
 * <b>Overview</b>
 * Direction2D implements Direction for two-dimensional game worlds.
 *
 * <b>Responsibilities</b>
 * Represent a direction in two-dimensions.  This includes only X and Y coordinate changes.
 *
 * <b>Collaborators</b>
 * None.
 *
 * <b>Implementor</b> - Bruce
 * <b>Tester</b> - Tim
 *
 * @author Bruce
 */
public final class Direction2D implements Direction
{
	/**
	 * The Vector2D that represents this Direction.
	 */
	private Vector2D vector;

	/**
	 * Creates a new Direction2D.
	 *
	 * @param vector the Vector2D that represents this new Direction.
	 * @throws NullPointerException if the specified Vector is <code>null</code>.
	 */
	public Direction2D(Vector2D vector) throws NullPointerException
	{
		if(vector == null)
			throw new NullPointerException();
		this.vector = vector;
	}

	/**
	 * @return the Vector2D that represents this Direction.
	 */
	public Vector2D getVector()
	{
		return vector;
	}
}